import sys
import math  

def isPrime(n):  
    if n <= 1:  
        return False 
    for i in range(2, int(math.sqrt(int(n))) + 1):  
        if n % i == 0:  
            return False 
    return True 
print(isPrime(67))
print(isPrime(71))
print(isPrime(101))
p = 67 
q = 71
n = p * q 

print("n = ",n,bin(n))

m = (p-1)*(q-1)

print("m = ",m,bin(m))


a = [228,184,173]
for a1 in a:
    print((a1**101) % n)
b = [4296,2458,3263]
for b1 in b:
    print(b1**1601 % n)



aa = 33478071698956898786044169848212690817704794983713768568912431388982883793878002287614711652531743087737814467999489 
bb = 36746043666799590428244633799627952632279158164343087642676032283815739666511279233373417143396810270092798736308917
cc = 1230186684530117755130494958384962720772853569595334792197322452151726400507263657518745202199786469389956474942774063845925192557326303453731548268507917026122142913461670429214311602221240479274737794080665351419597459856902143413

print(aa*bb == cc)
print(aa*bb)
print(cc)

exit()

for y in range(1,4620):
    for x in range(1,4620):
        if (101*x- 4620*y == 1):
            print(x,y)
            break


